<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArRobotJoyHandler Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArRobotJoyHandler.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArRobotJoyHandler-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArRobotJoyHandler Class Reference<div class="ingroups"><a class="el" href="group__OptionalClasses.html">Optional Classes</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Interfaces to a joystick on the robot's microcontroller.  
 <a href="classArRobotJoyHandler.html#details">More...</a></p>

<p><code>#include &lt;ArRobotJoyHandler.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2cb5d511b3deab3908d013747305b767"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2cb5d511b3deab3908d013747305b767"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotJoyHandler.html#a2cb5d511b3deab3908d013747305b767">addToConfig</a> (<a class="el" href="classArConfig.html">ArConfig</a> *config, const char *section)</td></tr>
<tr class="memdesc:a2cb5d511b3deab3908d013747305b767"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds to a section in a config. <br /></td></tr>
<tr class="separator:a2cb5d511b3deab3908d013747305b767"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a542e57bb477932f93e6f5c3bd5e2f619"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a542e57bb477932f93e6f5c3bd5e2f619"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotJoyHandler.html#a542e57bb477932f93e6f5c3bd5e2f619">ArRobotJoyHandler</a> (<a class="el" href="classArRobot.html">ArRobot</a> *robot)</td></tr>
<tr class="memdesc:a542e57bb477932f93e6f5c3bd5e2f619"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a542e57bb477932f93e6f5c3bd5e2f619"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15c8c094a03c4f34b912aa724162a152"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a15c8c094a03c4f34b912aa724162a152"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotJoyHandler.html#a15c8c094a03c4f34b912aa724162a152">getButton1</a> (void)</td></tr>
<tr class="memdesc:a15c8c094a03c4f34b912aa724162a152"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the first button. <br /></td></tr>
<tr class="separator:a15c8c094a03c4f34b912aa724162a152"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c497bf4d87077b09724f399f09bb81b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c497bf4d87077b09724f399f09bb81b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotJoyHandler.html#a5c497bf4d87077b09724f399f09bb81b">getButton2</a> (void)</td></tr>
<tr class="memdesc:a5c497bf4d87077b09724f399f09bb81b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the second button. <br /></td></tr>
<tr class="separator:a5c497bf4d87077b09724f399f09bb81b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3e2aec076f9f95aaed152e80f803744"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af3e2aec076f9f95aaed152e80f803744"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotJoyHandler.html#af3e2aec076f9f95aaed152e80f803744">getDataReceivedTime</a> (void)</td></tr>
<tr class="memdesc:af3e2aec076f9f95aaed152e80f803744"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the time we last got information back. <br /></td></tr>
<tr class="separator:af3e2aec076f9f95aaed152e80f803744"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a763d86dd63d38cceae40e4fd13eb97bb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a763d86dd63d38cceae40e4fd13eb97bb"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotJoyHandler.html#a763d86dd63d38cceae40e4fd13eb97bb">getDoubles</a> (double *x, double *y, double *z)</td></tr>
<tr class="memdesc:a763d86dd63d38cceae40e4fd13eb97bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the adjusted reading, as floats. <br /></td></tr>
<tr class="separator:a763d86dd63d38cceae40e4fd13eb97bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bdd3f42e767e1525d39b130273fabdb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2bdd3f42e767e1525d39b130273fabdb"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotJoyHandler.html#a2bdd3f42e767e1525d39b130273fabdb">getRawThrottle</a> (void)</td></tr>
<tr class="memdesc:a2bdd3f42e767e1525d39b130273fabdb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the throttle value (only use for information, or with the robot locked, getDoubles is preferred) <br /></td></tr>
<tr class="separator:a2bdd3f42e767e1525d39b130273fabdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e97232d96249a0b1463c14e4eaebdc8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e97232d96249a0b1463c14e4eaebdc8"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotJoyHandler.html#a8e97232d96249a0b1463c14e4eaebdc8">getRawX</a> (void)</td></tr>
<tr class="memdesc:a8e97232d96249a0b1463c14e4eaebdc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the X value (only use for information, or with the robot locked, getDoubles is preferred) <br /></td></tr>
<tr class="separator:a8e97232d96249a0b1463c14e4eaebdc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a58f5ca75302eb5f28144bed5fd1214"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8a58f5ca75302eb5f28144bed5fd1214"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotJoyHandler.html#a8a58f5ca75302eb5f28144bed5fd1214">getRawY</a> (void)</td></tr>
<tr class="memdesc:a8a58f5ca75302eb5f28144bed5fd1214"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the Y value (only use for information, or with the robot locked, getDoubles is preferred) <br /></td></tr>
<tr class="separator:a8a58f5ca75302eb5f28144bed5fd1214"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d846b3eca4815068d2195f8897ac699"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7d846b3eca4815068d2195f8897ac699"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotJoyHandler.html#a7d846b3eca4815068d2195f8897ac699">gotData</a> (void)</td></tr>
<tr class="memdesc:a7d846b3eca4815068d2195f8897ac699"><td class="mdescLeft">&#160;</td><td class="mdescRight">If we've ever gotten a packet back. <br /></td></tr>
<tr class="separator:a7d846b3eca4815068d2195f8897ac699"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a4567823c180b622f0ec9bb657c85e9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0a4567823c180b622f0ec9bb657c85e9"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotJoyHandler.html#a0a4567823c180b622f0ec9bb657c85e9">~ArRobotJoyHandler</a> ()</td></tr>
<tr class="memdesc:a0a4567823c180b622f0ec9bb657c85e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a0a4567823c180b622f0ec9bb657c85e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a257807cc3ec0eec2ad6df97c1b1e5c9b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a257807cc3ec0eec2ad6df97c1b1e5c9b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>connectCallback</b> (void)</td></tr>
<tr class="separator:a257807cc3ec0eec2ad6df97c1b1e5c9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f86c9059d709a56adf6055dbfba8b17"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8f86c9059d709a56adf6055dbfba8b17"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>handleJoystickPacket</b> (<a class="el" href="classArRobotPacket.html">ArRobotPacket</a> *packet)</td></tr>
<tr class="separator:a8f86c9059d709a56adf6055dbfba8b17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a82040952c460d9d3e515a80c68c479"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5a82040952c460d9d3e515a80c68c479"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>stopPackets</b> ()</td></tr>
<tr class="separator:a5a82040952c460d9d3e515a80c68c479"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:abb7689b9d3775376861d3ea5625b1348"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abb7689b9d3775376861d3ea5625b1348"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myButton1</b></td></tr>
<tr class="separator:abb7689b9d3775376861d3ea5625b1348"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78dda4366caf883f469213c36bbb744d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a78dda4366caf883f469213c36bbb744d"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myButton2</b></td></tr>
<tr class="separator:a78dda4366caf883f469213c36bbb744d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6dcac9381f521580a6e5b3bd93581914"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6dcac9381f521580a6e5b3bd93581914"></a>
<a class="el" href="classArFunctorC.html">ArFunctorC</a>&lt; <a class="el" href="classArRobotJoyHandler.html">ArRobotJoyHandler</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myConnectCB</b></td></tr>
<tr class="separator:a6dcac9381f521580a6e5b3bd93581914"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad46846447c59b773f76dbe2a01ecb7c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aad46846447c59b773f76dbe2a01ecb7c"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myDataReceived</b></td></tr>
<tr class="separator:aad46846447c59b773f76dbe2a01ecb7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbe7a0485c7733c64f26ad0ff48cfd1c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abbe7a0485c7733c64f26ad0ff48cfd1c"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myGotData</b></td></tr>
<tr class="separator:abbe7a0485c7733c64f26ad0ff48cfd1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4631cca55f6048b5b4bfcdab8a72399"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae4631cca55f6048b5b4bfcdab8a72399"></a>
<a class="el" href="classArRetFunctor1C.html">ArRetFunctor1C</a>&lt; bool, <a class="el" href="classArRobotJoyHandler.html">ArRobotJoyHandler</a>, <a class="el" href="classArRobotPacket.html">ArRobotPacket</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myHandleJoystickPacketCB</b></td></tr>
<tr class="separator:ae4631cca55f6048b5b4bfcdab8a72399"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae35aca9de2a08db5d2798a4355887be4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae35aca9de2a08db5d2798a4355887be4"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myJoyX</b></td></tr>
<tr class="separator:ae35aca9de2a08db5d2798a4355887be4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a414b9d5097e2523484c4d70e1b6f1eeb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a414b9d5097e2523484c4d70e1b6f1eeb"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myJoyXCenter</b></td></tr>
<tr class="separator:a414b9d5097e2523484c4d70e1b6f1eeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d73963de734576352a5860d8c93ee87"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9d73963de734576352a5860d8c93ee87"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myJoyY</b></td></tr>
<tr class="separator:a9d73963de734576352a5860d8c93ee87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1821f5ce2adccbd56eefc2cb55d671d7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1821f5ce2adccbd56eefc2cb55d671d7"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myJoyYCenter</b></td></tr>
<tr class="separator:a1821f5ce2adccbd56eefc2cb55d671d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9195e2259180b13b26b45d1fe5b57c7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae9195e2259180b13b26b45d1fe5b57c7"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myRawThrottle</b></td></tr>
<tr class="separator:ae9195e2259180b13b26b45d1fe5b57c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad425b4d1653a0dc823f5327a15e01ee7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad425b4d1653a0dc823f5327a15e01ee7"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myRawX</b></td></tr>
<tr class="separator:ad425b4d1653a0dc823f5327a15e01ee7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52af306e74acd9aa256ada55343d8115"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a52af306e74acd9aa256ada55343d8115"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myRawY</b></td></tr>
<tr class="separator:a52af306e74acd9aa256ada55343d8115"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a380b7fdfdc5764c8ab2cf1ca2a9bc486"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a380b7fdfdc5764c8ab2cf1ca2a9bc486"></a>
<a class="el" href="classArRobot.html">ArRobot</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myRobot</b></td></tr>
<tr class="separator:a380b7fdfdc5764c8ab2cf1ca2a9bc486"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79de11e8dc8264f526ba1613c5d889af"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a79de11e8dc8264f526ba1613c5d889af"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myStarted</b></td></tr>
<tr class="separator:a79de11e8dc8264f526ba1613c5d889af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab17d16a47f57c0ea057f10d469b817b6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab17d16a47f57c0ea057f10d469b817b6"></a>
<a class="el" href="classArFunctorC.html">ArFunctorC</a>&lt; <a class="el" href="classArRobotJoyHandler.html">ArRobotJoyHandler</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myStopPacketsCB</b></td></tr>
<tr class="separator:ab17d16a47f57c0ea057f10d469b817b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af81892e44278be65587403d4b3555664"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af81892e44278be65587403d4b3555664"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myThrottle</b></td></tr>
<tr class="separator:af81892e44278be65587403d4b3555664"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Interfaces to a joystick on the robot's microcontroller. </p>
<p>This is largely meant to be about the same as the normal joy handler but gets the data back from the robot about the joystick, but this sameness is why it reports things as it does.</p>
<p>Also note that x is usually rotational velocity (since it right/left), whereas Y is translational (since it is up/down).</p>
<p>When created, this class requests continuous joystick packets from the robot if already connected, or if not, requests joystick packets upon robot connection. In requests that the joystick data be stopped upon normal robot disconnection, ARIA program exit, or when this object is destroyed. </p>
</div><hr/>The documentation for this class was generated from the following files:<ul>
<li>ArRobotJoyHandler.h</li>
<li>ArRobotJoyHandler.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArRobotJoyHandler.html">ArRobotJoyHandler</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
